import request from "@/utils/request";

export function fetchAddressList() {
	return request({
		method: 'GET',
		url: '/medicine/address/getAddressByUserId'
	})
}

export function fetchAddressDetail(id) {
	return request({
		method: 'GET',
		url: `/medicine/address/${id}`
	})
}

export function addAddress(data) {
	return request({
		method: 'POST',
		url: '/medicine/address/add',
		data:data
	})
}

export function updateAddress(data) {
	return request({
		method: 'POST',
		url: `/medicine/address/update`,
		data:data
	})
}

export function deleteAddress(id) {
	return request({
		method: 'POST',
		url: `/medicine/address/delete/${id}`
	})
}


export function toParseAddress(data) {
	return request({
		method: 'POST',
		url: `/medicine/address/parseAddress`,
		data: data
	})
}
export function receiveAddressFindId(id) {
	return request({
		method: 'GET',
		url: `/medicine/address/${id}`
	})
}
export function getAddressList() {
	return request({
		method: 'GET',
		url: `/medicine/address/list`
	})
}
